class BaseException extends Error {
  constructor(message) {
    super(message)
  }
}
class ServiceException extends BaseException {
  constructor(message) {
    super(message)
  }
}

const error = new ServiceException('ServiceException')
console.log(error instanceof ServiceException)
console.log(error instanceof BaseException)
console.log(error instanceof Error)
console.log(error instanceof Object)
console.log(error instanceof Array)
console.log(error instanceof String)
console.log(error instanceof Number)
console.log(error instanceof Boolean)
console.log(error instanceof Date)
console.log(error instanceof RegExp)
